﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data.OleDb;
using System.Data;
using System.Data.Sql;

namespace Game.Handlers
{
    public class BaseStats
    {
        public int strength;
        public int intelligance;
        public int stamina;
        public int apperance;
        public int dexterity;
        public int mana;
        public float cocksize;
        public float clitsize;
        public string breastsize;
        public int _yen;
        public int _debt;


        private int gender_bonus;
        private int basepoints = 1000;
        private int diff_bonus;
        public int _basepoints;

        #region Starting Build Points
        public  void Start_BuildPoints(string gender, int age)
        {
            Handlers.DBManager dbm = new DBManager();
            DataTable dt = dbm.DT("SELECT `Difficulty` FROM `Settings`");
            foreach (DataRow dr in dt.Rows)
            {
                if ((int)dr[0] == 0)
                {
                    diff_bonus = +1000;
                }
                if ((int)dr[0] == 1)
                {
                    diff_bonus = -650;
                }
                if ((int)dr[0] == 2)
                {
                    diff_bonus = -1200;
                }
            }

            if (gender == "male")
            {
                gender_bonus = 100;
                _basepoints = basepoints + gender_bonus + diff_bonus * age / 3;
                
            }
            else if (gender == "female")
            {
                gender_bonus = 1000;
                _basepoints = basepoints + gender_bonus + diff_bonus * age / 3;
            }
            else if (gender == "futanari")
            {
                gender_bonus = 3000;
                _basepoints = basepoints + gender_bonus + diff_bonus * age / 3;
            }
            //    return basepoints + gender_bonus + diff_bonus;
        }
        #endregion

        Random rnd = new Random();
        public void Male()
        {
            strength = rnd.Next(3, 9);
            intelligance = rnd.Next(1, 5);
            stamina = rnd.Next(1, 6);
            dexterity = rnd.Next(1, 4);
            mana = 0;
            apperance = rnd.Next(1, 4);
            cocksize = 5.0f;
            clitsize = 0.0f;
            breastsize = "None";
            _yen = 400;
            _debt = 12000;
        }
        public void Female()
        {
            strength = rnd.Next(3,6);
            intelligance = rnd.Next(1, 6);
            stamina = rnd.Next(1, 5);
            apperance = rnd.Next(1, 6);
            dexterity = rnd.Next(1, 5);
            mana = 0;
            cocksize = 0.0f;
            clitsize = 0.5f;
            breastsize = "30A";
            _yen = 600;
            _debt = 13000;
        }
        public void Futanari()
        {
            strength = rnd.Next(3, 13);
            intelligance = rnd.Next(1, 5);
            stamina = rnd.Next(2, 6);
            apperance = rnd.Next(1, 5);
            dexterity = rnd.Next(2, 11);
            mana = 0;
            cocksize = 5.0f;
            clitsize = 0.0f;
            breastsize = "30A";
            _yen = 800;
            _debt = 20000;
        }
    }
}
